{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Examples of plugins usage in folium"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.11.0+16.g585337f\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "import folium\n",
    "from folium import plugins\n",
    "\n",
    "print(folium.__version__)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this notebook we show a few illustrations of folium's plugin extensions. These are available after importing `folium.plugins`."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ScrollZoomToggler\n",
    "Adds a button to enable/disable zoom scrolling."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29t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AgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvZ2gvcHl0aG9uLXZpc3VhbGl6YXRpb24vZm9saXVtL2ZvbGl1bS90ZW1wbGF0ZXMvbGVhZmxldC5hd2Vzb21lLnJvdGF0ZS5taW4uY3NzIi8+CiAgICA8c3R5bGU+aHRtbCwgYm9keSB7d2lkdGg6IDEwMCU7aGVpZ2h0OiAxMDAlO21hcmdpbjogMDtwYWRkaW5nOiAwO308L3N0eWxlPgogICAgPHN0eWxlPiNtYXAge3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO2JvdHRvbTowO3JpZ2h0OjA7bGVmdDowO308L3N0eWxlPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfMzI0N2FlMmJkZWE0NDVhMTgxNzEzYTNkM2Y0MTQwMmEgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgCiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNzY3JvbGxfem9vbV90b2dnbGVyXzRiNWRmNGU1OTNmNjRiYmM5M2U1MTBlYmFiNzYzNmU1IHsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDozNXB4OwogICAgICAgICAgICAgICAgICAgIGJvdHRvbToxMHB4OwogICAgICAgICAgICAgICAgICAgIGhlaWdodDozNXB4OwogICAgICAgICAgICAgICAgICAgIGxlZnQ6MTBweDsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6MzVweDsKICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgPC9zdHlsZT4KICAgICAgICAKPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYSIgPjwvZGl2PgogICAgICAgIAogICAgCiAgICAgICAgICAgIDxpbWcgaWQ9InNjcm9sbF96b29tX3RvZ2dsZXJfNGI1ZGY0ZTU5M2Y2NGJiYzkzZTUxMGViYWI3NjM2ZTUiCiAgICAgICAgICAgICAgICAgYWx0PSJzY3JvbGwiCiAgICAgICAgICAgICAgICAgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9pb25pY29ucy8yLjAuMS9wbmcvNTEyL2Fycm93LW1vdmUucG5nIgogICAgICAgICAgICAgICAgIHN0eWxlPSJ6LWluZGV4OiA5OTk5OTkiCiAgICAgICAgICAgICAgICAgb25jbGljaz0ibWFwXzMyNDdhZTJiZGVhNDQ1YTE4MTcxM2EzZDNmNDE0MDJhLnRvZ2dsZVNjcm9sbCgpIj4KICAgICAgICAgICAgPC9pbWc+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYSIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDUuMCwgMy4wXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDQsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl82OTA0ODE2OWFhNDE0NzQ2OTE2ZDU1NmU1Njg4YmQxMCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfMzI0N2FlMmJkZWE0NDVhMTgxNzEzYTNkM2Y0MTQwMmEpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYS5zY3JvbGxFbmFibGVkID0gdHJ1ZTsKCiAgICAgICAgICAgIG1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYS50b2dnbGVTY3JvbGwgPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnNjcm9sbEVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbEVuYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbFdoZWVsWm9vbS5kaXNhYmxlKCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsRW5hYmxlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxXaGVlbFpvb20uZW5hYmxlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIG1hcF8zMjQ3YWUyYmRlYTQ0NWExODE3MTNhM2QzZjQxNDAyYS50b2dnbGVTY3JvbGwoKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac187848>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45, 3], zoom_start=4)\n",
    "\n",
    "plugins.ScrollZoomToggler().add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_0.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## MarkerCluster"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Adds a MarkerCluster layer on the map."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3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ZsYXJlLmNvbS9hamF4L2xpYnMvbGVhZmxldC5tYXJrZXJjbHVzdGVyLzEuMS4wL01hcmtlckNsdXN0ZXIuRGVmYXVsdC5jc3MiLz4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF85ODgyNTg3YTgxM2U0OGY0ODJmYTdhN2E2NmZmMTRlNyIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfOTg4MjU4N2E4MTNlNDhmNDgyZmE3YTdhNjZmZjE0ZTcgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfOTg4MjU4N2E4MTNlNDhmNDgyZmE3YTdhNjZmZjE0ZTciLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzQ1LjAsIDMuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNjBiZjE0MmYzMDMyNGRhYThmZWU1YzEwN2U3NzYzMzQgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPc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0aCI6ICIxMDAlIn0pOwoKICAgICAgICAKICAgICAgICAgICAgdmFyIGh0bWxfZDg3ZDM5MmE1NTcyNGUzNThmODgzOGU4NzA5NzkwMzYgPSAkKGA8ZGl2IGlkPSJodG1sX2Q4N2QzOTJhNTU3MjRlMzU4Zjg4MzhlODcwOTc5MDM2IiBzdHlsZT0id2lkdGg6IDEwMC4wJTsgaGVpZ2h0OiAxMDAuMCU7Ij45OTwvZGl2PmApWzBdOwogICAgICAgICAgICBwb3B1cF8zNmI4NTkyOWFmN2Q0OTYwYjcyNGM2MGUyN2U1NzlkZi5zZXRDb250ZW50KGh0bWxfZDg3ZDM5MmE1NTcyNGUzNThmODgzOGU4NzA5NzkwMzYpOwogICAgICAgIAoKICAgICAgICBtYXJrZXJfMGNhNDUyNDg1Njc1NDQ2ZGFiYTlkM2ExODQwYmY2N2MuYmluZFBvcHVwKHBvcHVwXzM2Yjg1OTI5YWY3ZDQ5NjBiNzI0YzYwZTI3ZTU3OWRmKQogICAgICAgIDsKCiAgICAgICAgCiAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac1cf448>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "N = 100\n",
    "data = np.array(\n",
    "    [\n",
    "        np.random.uniform(low=35, high=60, size=N),  # Random latitudes in Europe.\n",
    "        np.random.uniform(low=-12, high=30, size=N),  # Random longitudes in Europe.\n",
    "    ]\n",
    ").T\n",
    "popups = [str(i) for i in range(N)] # Popups texts are simple numbers.\n",
    "\n",
    "m = folium.Map([45, 3], zoom_start=4)\n",
    "\n",
    "plugins.MarkerCluster(data, popups=popups).add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_1.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Terminator"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2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xlPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfNzcyOGNhYmU2NjAwNGQ0YTkzMDhmZDJjZGNjZjU4N2QgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vdW5wa2cuY29tL0Bqb2VyZ2RpZXRyaWNoL2xlYWZsZXQudGVybWluYXRvciI+PC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+ICAgIAogICAgCiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfNzcyOGNhYmU2NjAwNGQ0YTkzMDhmZDJjZGNjZjU4N2QiID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwXzc3MjhjYWJlNjYwMDRkNGE5MzA4ZmQyY2RjY2Y1ODdkID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwXzc3MjhjYWJlNjYwMDRkNGE5MzA4ZmQyY2RjY2Y1ODdkIiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0NS4wLCAzLjBdLAogICAg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mQyY2RjY2Y1ODdkKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac32d848>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45, 3], zoom_start=1)\n",
    "\n",
    "plugins.Terminator().add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_2.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  BoatMarker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3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iBocmVmPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvZ2gvcHl0aG9uLXZpc3VhbGl6YXRpb24vZm9saXVtL2ZvbGl1bS90ZW1wbGF0ZXMvbGVhZmxldC5hd2Vzb21lLnJvdGF0ZS5taW4uY3NzIi8+CiAgICA8c3R5bGU+aHRtbCwgYm9keSB7d2lkdGg6IDEwMCU7aGVpZ2h0OiAxMDAlO21hcmdpbjogMDtwYWRkaW5nOiAwO308L3N0eWxlPgogICAgPHN0eWxlPiNtYXAge3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO2JvdHRvbTowO3JpZ2h0OjA7bGVmdDowO308L3N0eWxlPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfYWFkMTE0ZDk0MWRkNDk4Y2E0MGJkM2JjZWFiMDk4MGQgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vdW5wa2cuY29tL2xlYWZsZXQuYm9hdG1hcmtlci9sZWFmbGV0LmJvYXRtYXJrZXIubWluLmpzIj48L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF9hYWQxMTRkOTQxZGQ0OThjYTQwYmQzYmNlYWIwOTgwZCIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfYWFkMTE0ZDk0MWRkNDk4Y2E0MGJkM2JjZWFiMDk4MGQgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfYWFkMTE0ZDk0MWRkNDk4Y2E0MGJkM2JjZWFiMDk4MGQiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzMwLjAsIDAuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAzLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMTJmM2NkMGVjM2M4NDliODlhNjZmMmJhNjljZTk0MjggPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImR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GVhZGluZ1dpbmQoCiAgICAgICAgICAgICAgICAtMjAsCiAgICAgICAgICAgICAgICAyNSwKICAgICAgICAgICAgICAgIDQ2CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac35d708>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([30, 0], zoom_start=3)\n",
    "\n",
    "plugins.BoatMarker(\n",
    "    location=(34, -43),\n",
    "    heading=45,\n",
    "    wind_heading=150,\n",
    "    wind_speed=45,\n",
    "    color='#8f8'\n",
    ").add_to(m)\n",
    "\n",
    "plugins.BoatMarker(\n",
    "    location=(46, -30),\n",
    "    heading=-20,\n",
    "    wind_heading=46,\n",
    "    wind_speed=25,\n",
    "    color='#88f'\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_3.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## BeautifyIcon"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA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GxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9naC9tYXJzbGFuMzkwL0JlYXV0aWZ5TWFya2VyL2xlYWZsZXQtYmVhdXRpZnktbWFya2VyLWljb24ubWluLmpzIj48L3NjcmlwdD4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL21hcnNsYW4zOTAvQmVhdXRpZnlNYXJrZXIvbGVhZmxldC1iZWF1dGlmeS1tYXJrZXItaWNvbi5taW4uY3NzIi8+CjwvaGVhZD4KPGJvZHk+ICAgIAogICAgCiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfMDA5ZDIyMjRkMjhhNDMwNGFkMGFiZmQyMGVhM2Y4OGUiID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwXzAwOWQyMjI0ZDI4YTQzMDRhZDBhYmZkMjBlYTNmODhlID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwXzAwOWQyMjI0ZDI4YTQzMDRhZDBhYmZkMjBlYTNmODhlIiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0NS41LCAtMTIyLjBdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMywKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNlLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwoKICAgICAgICAgICAg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NjE0MDBlOTI2ODEwZTY2MzhhZDcxOSA9ICQoYDxkaXYgaWQ9Imh0bWxfZGU0YTFlMWQzNDYxNDAwZTkyNjgxMGU2NjM4YWQ3MTkiIHN0eWxlPSJ3aWR0aDogMTAwLjAlOyBoZWlnaHQ6IDEwMC4wJTsiPlBvcnRsYW5kLCBPUjwvZGl2PmApWzBdOwogICAgICAgICAgICBwb3B1cF80OTc1MTAxZDZlYzk0YjNiYTFhYzkyYzJhMWY1NmM2MC5zZXRDb250ZW50KGh0bWxfZGU0YTFlMWQzNDYxNDAwZTkyNjgxMGU2NjM4YWQ3MTkpOwogICAgICAgIAoKICAgICAgICBtYXJrZXJfZGVmNzYyMDhhZTI2NDNjZmFiMjYwZTlhZWM0Mjk5ZTEuYmluZFBvcHVwKHBvcHVwXzQ5NzUxMDFkNmVjOTRiM2JhMWFjOTJjMmExZjU2YzYwKQogICAgICAgIDsKCiAgICAgICAgCiAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac36b4c8>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45.5, -122], zoom_start=3)\n",
    "\n",
    "icon_plane = plugins.BeautifyIcon(\n",
    "    icon='plane',\n",
    "    border_color='#b3334f',\n",
    "    text_color='#b3334f',\n",
    "    icon_shape='triangle')\n",
    "\n",
    "icon_number = plugins.BeautifyIcon(\n",
    "    border_color='#00ABDC',\n",
    "    text_color='#00ABDC',\n",
    "    number=10,\n",
    "    inner_icon_style='margin-top:0;')\n",
    "\n",
    "folium.Marker(\n",
    "    location=[46, -122],\n",
    "    popup='Portland, OR',\n",
    "    icon=icon_plane\n",
    ").add_to(m)\n",
    "\n",
    "folium.Marker(\n",
    "    location=[50, -122],\n",
    "    popup='Portland, OR',\n",
    "    icon=icon_number\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_4.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Fullscreen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbG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1YmNkNGU0M2FmM2QyOWNmNDRiNzg1YmMiID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwX2EyOWQ5YmE0NWJjZDRlNDNhZjNkMjljZjQ0Yjc4NWJjID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwX2EyOWQ5YmE0NWJjZDRlNDNhZjNkMjljZjQ0Yjc4NWJjIiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0MS45LCAtOTcuM10sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNDM2MTU0MDIzNjdlNDE5OWFmZmEwMmNkZDA1NjhhYTUgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2EyOWQ5YmE0NWJjZDRlNDNhZjNkMjljZjQ0Yjc4NWJjKTsKICAgICAgICAKICAgIAogICAgICAgICAgICBMLmNvbnRyb2wuZnVsbHNjcmVlbigKICAgICAgICAgICAgICAgIHsiZm9yY2VTZXBhcmF0ZUJ1dHRvbiI6IHRydWUsICJwb3NpdGlvbiI6ICJ0b3ByaWdodCIsICJ0aXRsZSI6ICJFeHBhbmQgbWUiLCAidGl0bGVDYW5jZWwiOiAiRXhpdCBtZSJ9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2EyOWQ5YmE0NWJjZDRlNDNhZjNkMjljZjQ0Yjc4NWJjKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac34cec8>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[41.9, -97.3], zoom_start=4)\n",
    "\n",
    "plugins.Fullscreen(\n",
    "    position='topright',\n",
    "    title='Expand me',\n",
    "    title_cancel='Exit me',\n",
    "    force_separate_button=True\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_5.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Timestamped GeoJSON"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuY3NzIi8+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb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zUuNjgxNTk2NTkwNjE1NjldXX0sICJwcm9wZXJ0aWVzIjogeyJ0aW1lcyI6IFsiMjAxNy0wNi0wMlQwMDozMDowMCIsICIyMDE3LTA2LTAyVDAwOjQwOjAwIl0sICJzdHlsZSI6IHsiY29sb3IiOiAiI0ZGRkZGRiIsICJ3ZWlnaHQiOiA1fX19XX0sIHsKICAgICAgICAgICAgICAgICAgICBwb2ludFRvTGF5ZXI6IGZ1bmN0aW9uIChmZWF0dXJlLCBsYXRMbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUucHJvcGVydGllcy5pY29uID09ICdtYXJrZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihmZWF0dXJlLnByb3BlcnRpZXMuaWNvbnN0eWxlKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuTWFya2VyKGxhdExuZywgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiBMLmljb24oZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSl9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbiA9PSAnY2lyY2xlJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuY2lyY2xlTWFya2VyKGxhdExuZywgZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9lbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuY2lyY2xlTWFya2VyKGxhdExuZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy9lbHNlCgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuTWFya2VyKGxhdExuZyk7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBzdHlsZTogZnVuY3Rpb24gKGZlYXR1cmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZlYXR1cmUucHJvcGVydGllcy5zdHlsZTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uRWFjaEZlYXR1cmU6IGZ1bmN0aW9uKGZlYXR1cmUsIGxheWVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMucG9wdXApIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXIuYmluZFBvcHVwKGZlYXR1cmUucHJvcGVydGllcy5wb3B1cCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgdmFyIHRpbWVzdGFtcGVkX2dlb19qc29uX2NiMGIzYzY5N2I2ODQwZjE4ZGIwNjdmMWZiODM4YWU1ID0gTC50aW1lRGltZW5zaW9uLmxheWVyLmdlb0pzb24oCiAgICAgICAgICAgICAgICBnZW9Kc29uTGF5ZXIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgdXBkYXRlVGltZURpbWVuc2lvbjogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBhZGRsYXN0UG9pbnQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgZHVyYXRpb246IHVuZGVmaW5lZCwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfMzMyYTA0ODc0YTdiNDgwMDg1Y2E5MWFiYmQ4NzEyNWMpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac2c3108>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(\n",
    "    location=[35.68159659061569, 139.76451516151428],\n",
    "    zoom_start=16\n",
    ")\n",
    "\n",
    "# Lon, Lat order.\n",
    "lines = [\n",
    "    {\n",
    "        'coordinates': [\n",
    "            [139.76451516151428, 35.68159659061569],\n",
    "            [139.75964426994324, 35.682590062684206],\n",
    "        ],\n",
    "        'dates': [\n",
    "            '2017-06-02T00:00:00',\n",
    "            '2017-06-02T00:10:00'\n",
    "        ],\n",
    "        'color': 'red'\n",
    "    },\n",
    "    {\n",
    "        'coordinates': [\n",
    "            [139.75964426994324, 35.682590062684206],\n",
    "            [139.7575843334198, 35.679505030038506],\n",
    "        ],\n",
    "        'dates': [\n",
    "            '2017-06-02T00:10:00',\n",
    "            '2017-06-02T00:20:00'\n",
    "        ],\n",
    "        'color': 'blue'\n",
    "    },\n",
    "    {\n",
    "        'coordinates': [\n",
    "            [139.7575843334198, 35.679505030038506],\n",
    "            [139.76337790489197, 35.678040905014065],\n",
    "        ],\n",
    "        'dates': [\n",
    "            '2017-06-02T00:20:00',\n",
    "            '2017-06-02T00:30:00'\n",
    "        ],\n",
    "        'color': 'green',\n",
    "        'weight': 15,\n",
    "    },\n",
    "    {\n",
    "        'coordinates': [\n",
    "            [139.76337790489197, 35.678040905014065],\n",
    "            [139.76451516151428, 35.68159659061569],\n",
    "        ],\n",
    "        'dates': [\n",
    "            '2017-06-02T00:30:00',\n",
    "            '2017-06-02T00:40:00'\n",
    "        ],\n",
    "        'color': '#FFFFFF',\n",
    "    },\n",
    "]\n",
    "\n",
    "features = [\n",
    "    {\n",
    "        'type': 'Feature',\n",
    "        'geometry': {\n",
    "            'type': 'LineString',\n",
    "            'coordinates': line['coordinates'],\n",
    "        },\n",
    "        'properties': {\n",
    "            'times': line['dates'],\n",
    "            'style': {\n",
    "                'color': line['color'],\n",
    "                'weight': line['weight'] if 'weight' in line else 5\n",
    "            }\n",
    "        }\n",
    "    }\n",
    "    for line in lines\n",
    "]\n",
    "\n",
    "plugins.TimestampedGeoJson({\n",
    "    'type': 'FeatureCollection',\n",
    "    'features': features,\n",
    "}, period='PT1M', add_last_point=True).add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_6.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8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29tL2F0dHJpYnV0aW9uc1wiXHUwMDNlYXR0cmlidXRpb25zXHUwMDNjL2FcdTAwM2UiLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZWYwOTE5OTM4NTM3NGM1ZmFjMTBhMzcwNDQ0MTEzZjApOwogICAgICAgIAogICAgCiAgICAgICAgICAgIEwuQ29udHJvbC5UaW1lRGltZW5zaW9uQ3VzdG9tID0gTC5Db250cm9sLlRpbWVEaW1lbnNpb24uZXh0ZW5kKHsKICAgICAgICAgICAgICAgIF9nZXREaXNwbGF5RGF0ZUZvcm1hdDogZnVuY3Rpb24oZGF0ZSl7CiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld2RhdGUgPSBuZXcgbW9tZW50KGRhdGUpOwogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKG5ld2RhdGUpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ld2RhdGUuZm9ybWF0KCJZWVlZL01NL0REIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBtYXBfZWYwOTE5OTM4NTM3NGM1ZmFjMTBhMzcwNDQ0MTEzZjAudGltZURpbWVuc2lvbiA9IEwudGltZURpbWVuc2lvbigKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBwZXJpb2Q6ICJQMU0iLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwogICAgICAgICAgICB2YXIgdGltZURpbWVuc2lvbkNvbnRyb2wgPSBuZXcgTC5Db250cm9sLlRpbWVEaW1lbnNpb25DdXN0b20oCiAgICAgICAgICAgICAgICB7ImF1dG9QbGF5IjogZmFsc2UsICJs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AyIiwgIjIwMTctMDctMDIiLCAiMjAxNy0wOC0wMiIsICIyMDE3LTA5LTAyIiwgIjIwMTctMTAtMDIiXSwgImljb24iOiAiY2lyY2xlIiwgImljb25zdHlsZSI6IHsiZmlsbENvbG9yIjogImdyZWVuIiwgImZpbGxPcGFjaXR5IjogMC42LCAic3Ryb2tlIjogImZhbHNlIiwgInJhZGl1cyI6IDEzfSwgInN0eWxlIjogeyJ3ZWlnaHQiOiAwfSwgImlkIjogIm1hbiJ9fV19LCB7CiAgICAgICAgICAgICAgICAgICAgcG9pbnRUb0xheWVyOiBmdW5jdGlvbiAoZmVhdHVyZSwgbGF0TG5nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbiA9PSAnbWFya2VyJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogTC5pY29uKGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Vsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTC5NYXJrZXIobGF0TG5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzLmljb24gPT0gJ2NpcmNsZScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbnN0eWxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLmNpcmNsZU1hcmtlcihsYXRMbmcsIGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLmNpcmNsZU1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgc3R5bGU6IGZ1bmN0aW9uIChmZWF0dXJlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmZWF0dXJlLnByb3BlcnRpZXMuc3R5bGU7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbkVhY2hGZWF0dXJlOiBmdW5jdGlvbihmZWF0dXJlLCBsYXllcikgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzLnBvcHVwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyLmJpbmRQb3B1cChmZWF0dXJlLnByb3BlcnRpZXMucG9wdXApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIHZhciB0aW1lc3RhbXBlZF9nZW9fanNvbl9iNmIwODJmMjgzOTg0NzQyYjk2ZWU1MjMzYWZkOGM1YyA9IEwudGltZURpbWVuc2lvbi5sYXllci5nZW9Kc29uKAogICAgICAgICAgICAgICAgZ2VvSnNvbkxheWVyLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRpbWVEaW1lbnNpb246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgYWRkbGFzdFBvaW50OiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGR1cmF0aW9uOiAiUDJNIiwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZWYwOTE5OTM4NTM3NGM1ZmFjMTBhMzcwNDQ0MTEzZjApOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac381e48>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "table = \"\"\"\\\n",
    "<table style=\\'width:100%\\'>\n",
    "  <tr>\n",
    "    <th>Firstname</th>\n",
    "    <th>Lastname</th>\n",
    "    <th>Age</th>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>Jill</td>\n",
    "    <td>Smith</td>\n",
    "    <td>50</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>Eve</td>\n",
    "    <td>Jackson</td>\n",
    "    <td>94</td>\n",
    "  </tr>\n",
    "</table>\n",
    "\"\"\"\n",
    "\n",
    "points = [\n",
    "    {\n",
    "        'time': '2017-06-02',\n",
    "        'popup': '<h1>address1</h1>',\n",
    "        'coordinates': [-2.548828, 51.467697]\n",
    "    },\n",
    "    {\n",
    "        'time': '2017-07-02',\n",
    "        'popup': '<h2 style=\\'color:blue;\\'>address2<h2>',\n",
    "        'coordinates': [-0.087891, 51.536086]\n",
    "    },\n",
    "    {\n",
    "        'time': '2017-08-02',\n",
    "        'popup': '<h2 style=\\'color:orange;\\'>address3<h2>',\n",
    "        'coordinates': [-6.240234, 53.383328]\n",
    "    },\n",
    "    {\n",
    "        'time': '2017-09-02',\n",
    "        'popup': '<h2 style=\\'color:green;\\'>address4<h2>',\n",
    "        'coordinates': [-1.40625, 60.261617]},\n",
    "    {\n",
    "        'time': '2017-10-02',\n",
    "        'popup': table,\n",
    "        'coordinates': [-1.516113, 53.800651]}\n",
    "]\n",
    "\n",
    "features = [\n",
    "    {\n",
    "        'type': 'Feature',\n",
    "        'geometry': {\n",
    "            'type': 'Point',\n",
    "            'coordinates': point['coordinates'],\n",
    "        },\n",
    "        'properties': {\n",
    "            'time': point['time'],\n",
    "            'popup': point['popup'],\n",
    "            'id': 'house',\n",
    "            'icon': 'marker',\n",
    "            'iconstyle': {\n",
    "                'iconUrl': 'https://leafletjs.com/examples/geojson/baseball-marker.png',\n",
    "                'iconSize': [20, 20]\n",
    "            }\n",
    "        }\n",
    "    } for point in points\n",
    "]\n",
    "\n",
    "features.append(\n",
    "    {\n",
    "        'type': 'Feature',\n",
    "        'geometry': {\n",
    "            'type': 'LineString',\n",
    "            'coordinates': [\n",
    "                [-2.548828, 51.467697],\n",
    "                [-0.087891, 51.536086],\n",
    "                [-6.240234, 53.383328],\n",
    "                [-1.40625, 60.261617],\n",
    "                [-1.516113, 53.800651]\n",
    "            ],\n",
    "        },\n",
    "        'properties': {\n",
    "            'popup': 'Current address',\n",
    "            'times': [\n",
    "                '2017-06-02',\n",
    "                '2017-07-02',\n",
    "                '2017-08-02',\n",
    "                '2017-09-02',\n",
    "                '2017-10-02'\n",
    "            ],\n",
    "            'icon': 'circle',\n",
    "            'iconstyle': {\n",
    "                'fillColor': 'green',\n",
    "                'fillOpacity': 0.6,\n",
    "                'stroke': 'false',\n",
    "                'radius': 13\n",
    "            },\n",
    "            'style': {'weight': 0},\n",
    "            'id': 'man'\n",
    "        }\n",
    "    }\n",
    ")\n",
    "\n",
    "m = folium.Map(\n",
    "    location=[56.096555, -3.64746],\n",
    "    tiles='cartodbpositron',\n",
    "    zoom_start=5,\n",
    ")\n",
    "\n",
    "plugins.TimestampedGeoJson(\n",
    "    {\n",
    "        'type': 'FeatureCollection',\n",
    "        'features': features\n",
    "    },\n",
    "    period='P1M',\n",
    "    add_last_point=True,\n",
    "    auto_play=False,\n",
    "    loop=False,\n",
    "    max_speed=1,\n",
    "    loop_button=True,\n",
    "    date_options='YYYY/MM/DD',\n",
    "    time_slider_drag_update=True,\n",
    "    duration='P2M'\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_7.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## FeatureGroupSubGroup\n",
    "\n",
    "### Sub categories\n",
    "\n",
    "Disable all markers in the category, or just one of the subgroup."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAub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ODZhZjJiNzFiOGMyIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF8xOGY1NGMyYWMyZDA0MzUxYTA0Nzg2YWYyYjcxYjhjMiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF8xOGY1NGMyYWMyZDA0MzUxYTA0Nzg2YWYyYjcxYjhjMiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMC4wLCAwLjBdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogNiwKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNlLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwoKICAgICAgICAgICAgCgogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzQ5YTk2MzM4Y2I0NzRkZGJhYWVjYjg1ZjA5NTlmYzM1ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAiaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmciLAogICAgICAgICAgICAgICAgeyJhdHRyaWJ1dGlvbiI6ICJEYXRhIGJ5IFx1MDAyNmNvcHk7IFx1MDAzY2EgaHJlZj1cImh0dHA6Ly9vcGVuc3RyZWV0bWFwLm9yZ1wiXHUwMDNlT3BlblN0cmVldE1hcFx1MDAzYy9hXHUwMDNlLCB1bmRlciBcdTAwM2NhIGhyZWY9XCJodHRwOi8vd3d3Lm9wZW5zdHJlZXRtYXAub3JnL2NvcHlyaWdodFwiXHUwMDNlT0RiTFx1MDAzYy9hXHUwMDNlLiIsICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwgIm1heE5hdGl2ZVpvb20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gICAgICAgICAgICAgICBbMS4wLCAtMS4wXSwKICAgICAgICAgICAgICAgIHt9CiAgICAgICAgICAgICkuYWRkVG8oZmVhdHVyZV9ncm91cF9zdWJfZ3JvdXBfZGFjNTY5YmQ1ODcyNDMxM2IzOWYwMDRiZjRiMzJlMzUpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBsYXllcl9jb250cm9sXzlkZjBmMmY1NDdhOTRkMWRiN2ZkYmI5NjJmODU0NWIxID0gewogICAgICAgICAgICAgICAgYmFzZV9sYXllcnMgOiB7CiAgICAgICAgICAgICAgICAgICAgIm9wZW5zdHJlZXRtYXAiIDogdGlsZV9sYXllcl80OWE5NjMzOGNiNDc0ZGRiYWFlY2I4NWYwOTU5ZmMzNSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBvdmVybGF5cyA6ICB7CiAgICAgICAgICAgICAgICAgICAgImdyb3VwcyIgOiBmZWF0dXJlX2dyb3VwXzAzMTQ3NGE4MDA4MTRkYmNiMzRiYTBjMDQ4MzM0NjcxLAogICAgICAgICAgICAgICAgICAgICJncm91cDEiIDogZmVhdHVyZV9ncm91cF9zdWJfZ3JvdXBfODY5OThjNzMyNmIxNDE1M2FjMjg2YWI4M2JiNWY4OTYsCiAgICAgICAgICAgICAgICAgICAgImdyb3VwMiIgOiBmZWF0dXJlX2dyb3VwX3N1Yl9ncm91cF9kYWM1NjliZDU4NzI0MzEzYjM5ZjAwNGJmNGIzMmUzNSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIEwuY29udHJvbC5sYXllcnMoCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sXzlkZjBmMmY1NDdhOTRkMWRiN2ZkYmI5NjJmODU0NWIxLmJhc2VfbGF5ZXJzLAogICAgICAgICAgICAgICAgbGF5ZXJfY29udHJvbF85ZGYwZjJmNTQ3YTk0ZDFkYjdmZGJiOTYyZjg1NDViMS5vdmVybGF5cywKICAgICAgICAgICAgICAgIHsiYXV0b1pJbmRleCI6IHRydWUsICJjb2xsYXBzZWQiOiBmYWxzZSwgInBvc2l0aW9uIjogInRvcHJpZ2h0In0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfMThmNTRjMmFjMmQwNDM1MWEwNDc4NmFmMmI3MWI4YzIpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac2941c8>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[0, 0], zoom_start=6)\n",
    "\n",
    "fg = folium.FeatureGroup(name='groups')\n",
    "m.add_child(fg)\n",
    "\n",
    "g1 = plugins.FeatureGroupSubGroup(fg, 'group1')\n",
    "m.add_child(g1)\n",
    "\n",
    "g2 = plugins.FeatureGroupSubGroup(fg, 'group2')\n",
    "m.add_child(g2)\n",
    "\n",
    "folium.Marker([-1, -1]).add_to(g1)\n",
    "folium.Marker([1, 1]).add_to(g1)\n",
    "\n",
    "folium.Marker([-1, 1]).add_to(g2)\n",
    "folium.Marker([1, -1]).add_to(g2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "m.save(os.path.join('results', 'Plugins_8.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Marker clusters across groups\n",
    "\n",
    "Create two subgroups, but cluster markers together."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data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Y0Nzg3ZWM4NCIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfZDg0MGQ4MDkwMWE1NDM0NGIyZGUxNGNmNDc4N2VjODQgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfZDg0MGQ4MDkwMWE1NDM0NGIyZGUxNGNmNDc4N2VjODQiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzAuMCwgMC4wXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDYsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl80MGVkNmVlYzdiMTc0YmYwYmNhM2NjZDcyN2NkNzg2ZCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJ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AgICB7ImF1dG9aSW5kZXgiOiB0cnVlLCAiY29sbGFwc2VkIjogZmFsc2UsICJwb3NpdGlvbiI6ICJ0b3ByaWdodCJ9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2Q4NDBkODA5MDFhNTQzNDRiMmRlMTRjZjQ3ODdlYzg0KTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac278608>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[0, 0], zoom_start=6)\n",
    "\n",
    "mcg = folium.plugins.MarkerCluster(control=False)\n",
    "m.add_child(mcg)\n",
    "\n",
    "g1 = folium.plugins.FeatureGroupSubGroup(mcg, 'group1')\n",
    "m.add_child(g1)\n",
    "\n",
    "g2 = folium.plugins.FeatureGroupSubGroup(mcg, 'group2')\n",
    "m.add_child(g2)\n",
    "\n",
    "folium.Marker([-1, -1]).add_to(g1)\n",
    "folium.Marker([1, 1]).add_to(g1)\n",
    "\n",
    "folium.Marker([-1, 1]).add_to(g2)\n",
    "folium.Marker([1, -1]).add_to(g2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "m.save(os.path.join('results', 'Plugins_9.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Minimap\n",
    "\n",
    "Adds a locator minimap to a folium document."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border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NTllY2Q2NDhiNGQ4ZjljNTllMDBhMzU1OGMzNzMgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2xlYWZsZXQtbWluaW1hcC8zLjYuMS9Db250cm9sLk1pbmlNYXAuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0LW1pbmltYXAvMy42LjEvQ29udHJvbC5NaW5pTWFwLmNzcyIvPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzEzMDU5ZWNkNjQ4YjRkOGY5YzU5ZTAwYTM1NThjMzczIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF8xMzA1OWVjZDY0OGI0ZDhmOWM1OWUwMGEzNTU4YzM3MyA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF8xMzA1OWVjZDY0OGI0ZDhmOWM1OWUwMGEzNTU4YzM3MyIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMzAuMCwgMjAuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMWJhNmQ4YmVjODczNDlhNmIwMTViMjcyMzVkMWNhMjkgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzEzMDU5ZWNkNjQ4YjRkOGY5YzU5ZTAwYTM1NThjMzczKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9hZjU5NTY3OGIwYTM0ZjkxYTFjZmQ1ZGM3YWQ0OGM2OCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3Blbn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AgICk7CiAgICAgICAgICAgIG1hcF8xMzA1OWVjZDY0OGI0ZDhmOWM1OWUwMGEzNTU4YzM3My5hZGRDb250cm9sKG1pbmlfbWFwX2I1MTBlYjQ0ZDhkMzQzMTc5ZTM2ZWMxZTE4NzgyNjZhKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac269a08>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=(30, 20), zoom_start=4)\n",
    "\n",
    "minimap = plugins.MiniMap()\n",
    "m.add_child(minimap)\n",
    "\n",
    "m.save(os.path.join('results', 'Plugins_10.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## DualMap\n",
    "The DualMap plugin can be used to display two maps side by side, where panning and zooming is syncronized.\n",
    "\n",
    "The `DualMap` class can be used just like the normal `Map` class. The two sub-maps can be accessed with its `m1` and `m2` attributes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgIC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AgICAgICAgICAgICAgICB0b3A6IDAuMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIDwvc3R5bGU+CiAgICAgICAgCiAgICAKICAgICAgICAgICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwKICAgICAgICAgICAgICAgIGluaXRpYWwtc2NhbGU9MS4wLCBtYXhpbXVtLXNjYWxlPTEuMCwgdXNlci1zY2FsYWJsZT1ubyIgLz4KICAgICAgICAgICAgPHN0eWxlPgogICAgICAgICAgICAgICAgI21hcF85ZmZlMGQ0NjM4MGU0OWI5OGE1YTc1NGIxODUxYTRiOCB7CiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgIHdpZHRoOiA1MC4wJTsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMC4wJTsKICAgICAgICAgICAgICAgICAgICBsZWZ0OiA1MC4wJTsKICAgICAgICAgICAgICAgICAgICB0b3A6IDAuMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIDwvc3R5bGU+CiAgICAgICAgCiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL2ppZXRlci9MZWFmbGV0LlN5bmMvTC5NYXAuU3luYy5taW4uanMiPjwvc2NyaXB0Pgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzRhM2VlYTZhYjY2MzQ5ZDFiNzE5MTU3YzBlMDNiODQ5IiA+PC9kaXY+CiAgICAgICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF85ZmZlMGQ0NjM4MGU0OWI5OGE1YTc1NGIxODUxYTRiOCIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfNGEzZWVhNmFiNjYzNDlkMWI3MTkxNTdjMGUwM2I4NDkgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfNGEzZWVhNmFiNjYzNDlkMWI3MTkxNTdjMGUwM2I4NDkiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzUyLjEsIDUuMV0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA4LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYzc0ZTkyYzg1NzEyNDE2MTg1ZmMzOWRkYjNjZjI0OTUgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHki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gIG1hcmtlcl80NDAwYjJkZjg4ZWM0MGUyODNjMDYzODg1ZmM0NTEyMS5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBib3RoCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgZmVhdHVyZV9ncm91cF8xOWI5NmZmYjRhMzA0ZDNjYmI1MGEwOTAyMWI1OGEyYSA9IEwuZmVhdHVyZUdyb3VwKAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhtYXBfNGEzZWVhNmFiNjYzNDlkMWI3MTkxNTdjMGUwM2I4NDkpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXJrZXJfNGJiNWYzN2EyMDVkNGI1NTgzN2Y0NjhjNmQ1MzY5Y2UgPSBMLm1hcmtlcigKICAgICAgICAgICAgICAgIFs1Mi40LCA1LjBdLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhmZWF0dXJlX2dyb3VwXzE5Yjk2ZmZiNGEzMDRkM2NiYjUwYTA5MDIxYjU4YTJhKTsKICAgICAgICAKICAgIAogICAgICAgICAgICBtYXJrZXJfNGJiNWYzN2EyMDVkNGI1NTgzN2Y0NjhjNmQ1MzY5Y2UuYmluZFRvb2x0aXAoCiAgICAgICAgICAgICAgICBgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgbGVmdAogICAgICAgICAgICAgICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGxheWVyX2NvbnRyb2xfOWMwNzFlOWM5ZTAyNGUyMjkyMjQyNDYzOGU0MDc3N2IgPSB7CiAgICAgICAgICAgICAgICBiYXNlX2xheWVycyA6IHsKICAgICAgICAgICAgICAgICAgICAib3BlbnN0cmVldG1hcCIgOiB0aWxlX2xheWVyX2M3NGU5MmM4NTcxMjQxNjE4NWZjMzlkZGIzY2YyNDk1LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogIHsKICAgICAgICAgICAgICAgICAgICAibWFya2Vyc19ib3RoIiA6IGZlYXR1cmVfZ3JvdXBfZDZjODNlYmFjMjRmNGFkN2I1OWY5N2Y2MjkwNGE5MjMsCiAgICAgICAgICAgICAgICAgICAgIm1hcmtlcnNfMSIgOiBmZWF0dXJlX2dyb3VwXzE5Yjk2ZmZiNGEzMDRkM2NiYjUwYTA5MDIxYjU4YTJhLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgTC5jb250cm9sLmxheWVycygKICAgICAgICAgICAgICAgIGxheWVyX2NvbnRyb2xfOWMwNzFlOWM5ZTAyNGUyMjkyMjQyNDYzOGU0MDc3N2IuYmFzZV9sYXllcnMsCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sXzljMDcxZTljOWUwMjRlMjI5MjI0MjQ2MzhlNDA3NzdiLm92ZXJsYXlzLAogICAgICAgICAgICAgICAgeyJhdXRvWkluZGV4IjogdHJ1ZSwgImNvbGxhcHNlZCI6IGZhbHNlLCAicG9zaXRpb24iOiAidG9wcmlnaHQifQogICAgICAgICAgICApLmFkZFRvKG1hcF80YTNlZWE2YWI2NjM0OWQxYjcxOTE1N2MwZTAzYjg0OSk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF85ZmZlMGQ0NjM4MGU0OWI5OGE1YTc1NGIxODUxYTRiOCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF85ZmZlMGQ0NjM4MGU0OWI5OGE1YTc1NGIxODUxYTRiOCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNTIuMSwgNS4xXSwKICAgICA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gICAgICAgICAgICAgIFs1Mi4wLCA1LjBdLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhmZWF0dXJlX2dyb3VwXzYxYTc3ZDM1YTFmOTQ2NDM4Y2JhZmQ4Y2I2YTFiOTU0KTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgaWNvbl80MTRhMGRjZWM2OTg0OThlODIwMWI0NGUyMTNiMGRlZSA9IEwuQXdlc29tZU1hcmtlcnMuaWNvbigKICAgICAgICAgICAgICAgIHsiZXh0cmFDbGFzc2VzIjogImZhLXJvdGF0ZS0wIiwgImljb24iOiAiaW5mby1zaWduIiwgImljb25Db2xvciI6ICJ3aGl0ZSIsICJtYXJrZXJDb2xvciI6ICJyZWQiLCAicHJlZml4IjogImdseXBoaWNvbiJ9CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIG1hcmtlcl9hMjAyNTIxZmFiMTA0NzA5OTEzZjBhNWQ3MzM2NDgxOC5zZXRJY29uKGljb25fNDE0YTBkY2VjNjk4NDk4ZTgyMDFiNDRlMjEzYjBkZWUpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcmtlcl9hMjAyNTIxZmFiMTA0NzA5OTEzZjBhNWQ3MzM2NDgxOC5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBib3RoCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgbGF5ZXJfY29udHJvbF80OTg2ZWM1ZmExNWI0YzU2OTczYzI0MGI5YzIwZTFmZCA9IHsKICAgICAgICAgICAgICAgIGJhc2VfbGF5ZXJzIDogewogICAgICAgICAgICAgICAgICAgICJjYXJ0b2RicG9zaXRyb24iIDogdGlsZV9sYXllcl80YTQxM2VhZWQwN2U0YjE4YWViMzIzOTlhNmQ3ZDhkNSwKICAgICAgICAgICAgICAgICAgICAib3BlbnN0cmVldG1hcCIgOiB0aWxlX2xheWVyXzU4MmQwNDFkMzRiMDQzMzA5OTFhY2ZiOGQyNTg2Nzg3LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogIHsKICAgICAgICAgICAgICAgICAgICAibWFya2Vyc19ib3RoIiA6IGZlYXR1cmVfZ3JvdXBfNjFhNzdkMzVhMWY5NDY0MzhjYmFmZDhjYjZhMWI5NTQsCiAgICAgICAgICAgICAgICAgICAgIm1hcmtlcnNfMiIgOiBmZWF0dXJlX2dyb3VwX2VjOGYyODUyYjVkNDQ2YTA5MjVmMDZhNTVmMWFkMGE3LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgTC5jb250cm9sLmxheWVycygKICAgICAgICAgICAgICAgIGxheWVyX2NvbnRyb2xfNDk4NmVjNWZhMTViNGM1Njk3M2MyNDBiOWMyMGUxZmQuYmFzZV9sYXllcnMsCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sXzQ5ODZlYzVmYTE1YjRjNTY5NzNjMjQwYjljMjBlMWZkLm92ZXJsYXlzLAogICAgICAgICAgICAgICAgeyJhdXRvWkluZGV4IjogdHJ1ZSwgImNvbGxhcHNlZCI6IGZhbHNlLCAicG9zaXRpb24iOiAidG9wcmlnaHQifQogICAgICAgICAgICApLmFkZFRvKG1hcF85ZmZlMGQ0NjM4MGU0OWI5OGE1YTc1NGIxODUxYTRiOCk7CiAgICAgICAgICAgIHRpbGVfbGF5ZXJfNTgyZDA0MWQzNGIwNDMzMDk5MWFjZmI4ZDI1ODY3ODcucmVtb3ZlKCk7CiAgICAgICAgICAgIHRpbGVfbGF5ZXJfNGE0MTNlYWVkMDdlNGIxOGFlYjMyMzk5YTZkN2Q4ZDUucmVtb3ZlKCk7CiAgICAgICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.plugins.dual_map.DualMap at 0x1f9ac3adc08>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = plugins.DualMap(location=(52.1, 5.1), tiles=None, zoom_start=8)\n",
    "\n",
    "folium.TileLayer('cartodbpositron').add_to(m.m2)\n",
    "folium.TileLayer('openstreetmap').add_to(m)\n",
    "\n",
    "fg_both = folium.FeatureGroup(name='markers_both').add_to(m)\n",
    "fg_1 = folium.FeatureGroup(name='markers_1').add_to(m.m1)\n",
    "fg_2 = folium.FeatureGroup(name='markers_2').add_to(m.m2)\n",
    "\n",
    "icon_red = folium.Icon(color='red')\n",
    "folium.Marker((52, 5), tooltip='both', icon=icon_red).add_to(fg_both)\n",
    "folium.Marker((52.4, 5), tooltip='left').add_to(fg_1)\n",
    "folium.Marker((52, 5.4), tooltip='right').add_to(fg_2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "m.save(os.path.join('results', 'Plugins_11.html'))\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Locate control\n",
    "\n",
    "Adds a control button that when clicked, the user device geolocation is displayed.\n",
    "For list of all possible keyword options see:\n",
    "https://github.com/domoritz/leaflet-locatecontrol#possible-options\n",
    "\n",
    "To work properly in production, the connection needs to be encrypted (HTTPS), otherwise browser will not\n",
    "allow users to share their location."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkP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ogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2xlYWZsZXQtbG9jYXRlY29udHJvbC8wLjY2LjIvTC5Db250cm9sLkxvY2F0ZS5taW4uanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0LWxvY2F0ZWNvbnRyb2wvMC42Ni4yL0wuQ29udHJvbC5Mb2NhdGUubWluLmNzcyIvPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzg1YzQwOTkxYjQ1MzRjYzA4YmE0MmY2ODFlNGU4YjQ4IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF84NWM0MDk5MWI0NTM0Y2MwOGJhNDJmNjgxZTRlOGI0OCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF84NWM0MDk5MWI0NTM0Y2MwOGJhNDJmNjgxZTRlOGI0OCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDEuOTcsIDIuODFdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMTAsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9jZDRiNzgxM2U4ZGQ0Y2IyOTM5YzlmNjJmNTRjMzZiOCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfODVjNDA5OTFiNDUzNGNjMDhiYTQyZjY4MWU0ZThiNDgpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBsb2NhdGVfY29udHJvbF8xOWZhZjA4Yjg1ODY0NTY1YWU2ODI3YTAwM2ExZjliMSA9IEwuY29udHJvbC5sb2NhdGUoCiAgICAgICAgICAgICAgICB7fQogICAgICAgICAgICApLmFkZFRvKG1hcF84NWM0MDk5MWI0NTM0Y2MwOGJhNDJmNjgxZTRlOGI0OCk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBsb2NhdGVfY29udHJvbF8xOTc5OTY5MDY4Y2M0ZGMzOTQ4ZWNhNjlmOGJjNzc5ZiA9IEwuY29udHJvbC5sb2NhdGUoCiAgICAgICAgICAgICAgICB7fQogICAgICAgICAgICApLmFkZFRvKG1hcF84NWM0MDk5MWI0NTM0Y2MwOGJhNDJmNjgxZTRlOGI0OCk7CiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgbG9jYXRlX2NvbnRyb2xfMTk3OTk2OTA2OGNjNGRjMzk0OGVjYTY5ZjhiYzc3OWYuc3RhcnQoKTsKICAgICAgICAgICAgCiAgICAgICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac2dc1c8>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([41.97,2.81])\n",
    "\n",
    "plugins.LocateControl().add_to(m)\n",
    "\n",
    "# If you want get the user device positon after load the map, set auto_start=True\n",
    "plugins.LocateControl(auto_start=True).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## SemiCircle\n",
    "This can be used to display a semicircle or sector on a map. Whilst called SemiCircle it is not limited to 180 degree angles and can be used to display a sector of any angle. \n",
    "The semicircle is defined with a location (the central point, if it was a full circle), a radius and will either have a direction and an arc **or** a start angle and a stop angle. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuY3NzIi8+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3Rz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S1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfYjc1MmFjYmUyNmM3NGEzMTg0N2Y2MzRjMGMwNGQ1OTcgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldC1zZW1pY2lyY2xlQDIuMC40L1NlbWljaXJjbGUubWluLmpzIj48L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF9iNzUyYWNiZTI2Yzc0YTMxODQ3ZjYzNGMwYzA0ZDU5NyIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfYjc1MmFjYmUyNmM3NGEzMTg0N2Y2MzRjMGMwNGQ1OTcgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfYjc1MmFjYmUyNmM3NGEzMTg0N2Y2MzRjMGMwNGQ1OTciLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzQ1LjAsIDMuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA1LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cn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3R5bGU9IndpZHRoOiAxMDAuMCU7IGhlaWdodDogMTAwLjAlOyI+RGlyZWN0aW9uIC0gMCBkZWdyZWVzLCBhcmMgOTAgZGVncmVlczwvZGl2PmApWzBdOwogICAgICAgICAgICBwb3B1cF8xMDQyODQ1YjQ5YTI0ZjBhYWJhYzMyN2U3ZmE4NTE0Yi5zZXRDb250ZW50KGh0bWxfN2IxOTEyYWMzZDMzNGQ4MTk0MjQ5ZWI3ZmE1NWM1NjYpOwogICAgICAgIAoKICAgICAgICBzZW1pX2NpcmNsZV83ZWIyMDU1YTRkZjI0ZmM2OTY5MTk5MmI2NWY3MGYzMC5iaW5kUG9wdXAocG9wdXBfMTA0Mjg0NWI0OWEyNGYwYWFiYWMzMjdlN2ZhODUxNGIpCiAgICAgICAgOwoKICAgICAgICAKICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac2e3b48>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45, 3], zoom_start=5)\n",
    "\n",
    "plugins.SemiCircle((45, 3), radius=400000, start_angle=50, stop_angle=200,\n",
    "                   color='green', fill_color='green', opacity=0,\n",
    "                   popup='start angle - 50 degrees, stop angle - 200 degrees'\n",
    "                  ).add_to(m)\n",
    "\n",
    "plugins.SemiCircle((46.5, 9.5), radius=200000,  direction=360, arc=90,\n",
    "                   color='red', fill_color='red', opacity=0,\n",
    "                   popup='Direction - 0 degrees, arc 90 degrees'\n",
    "                  ).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Geocoder\n",
    "\n",
    "Adds a search box to the map to search for geographic features like cities, countries, etc. You can search with names or addresses.\n",
    "\n",
    "Uses the Nomatim service from OpenStreetMap. Please respect their usage policy: https://operations.osmfoundation.org/policies/nominatim/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldEAxLjYuMC9kaXN0L2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY29kZS5qcXVlcnkuY29tL2pxdWVyeS0xLjEyLjQubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzO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3N0eWxlPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfNjI0MzFmYzhkZWY1NDEyYjg5Njc1ODVhNmMyNGMyM2MgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vdW5wa2cuY29tL2xlYWZsZXQtY29udHJvbC1nZW9jb2Rlci9kaXN0L0NvbnRyb2wuR2VvY29kZXIuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL3VucGtnLmNvbS9sZWFmbGV0LWNvbnRyb2wtZ2VvY29kZXIvZGlzdC9Db250cm9sLkdlb2NvZGVyLmNzcyIvPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzYyNDMxZmM4ZGVmNTQxMmI4OTY3NTg1YTZjMjRjMjNjIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF82MjQzMWZjOGRlZjU0MTJiODk2NzU4NWE2YzI0YzIzYyA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF82MjQzMWZjOGRlZjU0MTJiODk2NzU4NWE2YzI0YzIzYyIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMCwgMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAxLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMTM1NTUwYTZjMThkNDY4ZGI4YzM1NTA2M2M0NTliMGIgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzYyNDMxZmM4ZGVmNTQxMmI4OTY3NTg1YTZjMjRjMjNjKTsKICAgICAgICAKICAgIAogICAgICAgICAgICBMLkNvbnRyb2wuZ2VvY29kZXIoCiAgICAgICAgICAgICAgICB7ImNvbGxhcHNlZCI6IGZhbHNlLCAiZGVmYXVsdE1hcmtHZW9jb2RlIjogdHJ1ZSwgInBvc2l0aW9uIjogInRvcHJpZ2h0In0KICAgICAgICAgICAgKS5vbignbWFya2dlb2NvZGUnLCBmdW5jdGlvbihlKSB7CiAgICAgICAgICAgICAgICBtYXBfNjI0MzFmYzhkZWY1NDEyYjg5Njc1ODVhNmMyNGMyM2Muc2V0VmlldyhlLmdlb2NvZGUuY2VudGVyLCAxMSk7CiAgICAgICAgICAgIH0pLmFkZFRvKG1hcF82MjQzMWZjOGRlZjU0MTJiODk2NzU4NWE2YzI0YzIzYyk7CgogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x1f9ac39bd88>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map()\n",
    "\n",
    "plugins.Geocoder().add_to(m)\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
